﻿@{
    Layout = "/Views/Shared/_Main.cshtml";
}
<br />
<div class="row-fluid">
    <div class="span3">
        <div class="border-gray bg-gray">
            <ul class="nav nav-list">
                <li class="nav-header">用户管理</li>
                <!--active-->
                <li class=""><a href="/usercenter/index">管理首页</a></li>
                <li class=""><a href="/usercenter/order">我的订单</a></li>
                <li class=""><a href="/usercenter/info">个人资料</a></li>
                <li class="active"><a href="/usercenter/mypwd">修改密码</a></li>
            </ul>
        </div>
    </div>
    <div class="span9 border-gray">
        <ul class="breadcrumb">
            <li><a href="user-center.html">管理首页</a> <span class="divider">/</span></li>
            <li class="active">修改密码</li>
        </ul>
        @if (ViewBag.Success != null)
        {
            if (ViewBag.Success == "修改成功")
            { 
                <span class="span11 alert alert-success">@ViewBag.Success</span>
            }
            else
            { 
                <span class="span11 alert alert-error">@ViewBag.Success</span>
            }
        }
        <br />
        <div class="">
            <form id="pwdform" action="/usercenter/mypwd" method="post" class="form-horizontal">
            <div class="control-group">
                <label class="control-label" for="password">
                    旧密码</label>
                <div class="controls">
                    <input type="password" class="span6 {required:true,minlength:6,maxlength:18}"
                        name="oldpwd" placeholder="请输入旧密码" />
                </div>
            </div>
            <div class="control-group">
                <label class="control-label" for="password">
                    新密码</label>
                <div class="controls">
                    <input type="password" class="span6 {required:true,strongpwd:true,minlength:6,maxlength:18}" id="txtpassword"
                        name="Password" placeholder="请输入新密码" />
                </div>
            </div>
            <div class="control-group">
                <label class="control-label" for="password-repeat">
                    密码重复</label>
                <div class="controls">
                    <input type="password" class="span6 {required:true,equalTo:'#txtpassword'}" id="txtconfrim"
                        name="Confirm" placeholder="请再次输入" />
                </div>
            </div>
            <div class="control-group">
                <div class="controls">
                    <br />
                    <button type="submit" class="btn btn-danger">
                        <i class="icon-ok icon-white"></i>&nbsp;修改密码
                    </button>
                </div>
            </div>
            </form>
            <!--#表单-->
        </div>
        <!--#购物车preview-->
    </div>
</div>
@section tail{
    <script type="text/javascript" src="/Scripts/jquery.validate.js"></script>
    <script type="text/javascript" src="/Scripts/jquery.metadata.js"></script>
<script type="text/javascript">
    $(function () {
        $('#pwdform').validate({
            errorClass: "help-inline",
            errorElement: "span",
            highlight: function (element, errorClass, validClass) {
                $(element).parents('.control-group').addClass('error');
            },
            unhighlight: function (element, errorClass, validClass) {
                $(element).parents('.control-group').removeClass('error');
            }
        });
    });
</script>
}